Upgrading ngrx/store to utilize new creator functions#228
Draft
marfehr wants to merge 1 commit intoMrWolfZ:developfrom
Draft
Upgrading ngrx/store to utilize new creator functions#228marfehr wants to merge 1 commit intoMrWolfZ:developfrom
marfehr wants to merge 1 commit intoMrWolfZ:developfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #228 +/- ##
===========================================
- Coverage 100.00% 99.91% -0.09%
===========================================
Files 128 128
Lines 2342 2266 -76
Branches 432 432
===========================================
- Hits 2342 2264 -78
- Misses 0 2 +2
Continue to review full report at Codecov.
|
marfehr
commented
Jan 27, 2021
| } | ||
|
|
||
| handleFormAction(action: Actions<any>) { | ||
| handleFormAction(action: NgrxFormActionTypes) { |
marfehr
commented
Jan 27, 2021
| // update from loaded data | ||
| if (a.type === SetManufacturersAction.TYPE) { | ||
| return (a as SetManufacturersAction).manufacturers; | ||
| if (a.type === SetManufacturersAction.type) { |
marfehr
commented
Jan 27, 2021
| export class LocalStateIntroductionComponent { | ||
| formState = INITIAL_FORM_STATE; | ||
|
|
||
| handleFormAction(action: Actions<any>) { |
marfehr
commented
Jan 27, 2021
| expect(a2.type).toBe(MarkAsDirtyAction.type); | ||
| expect(a3.type).toBe(SetValueAction.type); | ||
| expect(a4.type).toBe(MarkAsDirtyAction.type); | ||
| // expect((a1 as SetValueAction<string>).value).toBe(RADIO_OPTIONS[0]); |
marfehr
commented
Jan 27, 2021
| expect(a.type).toBe(SetValueAction.TYPE); | ||
| expect((a as SetValueAction<string>).value).toBe(RADIO_OPTIONS[0]); | ||
| expect(a.type).toBe(SetValueAction.type); | ||
| // expect((a as SetValueAction<string>).value).toBe(RADIO_OPTIONS[0]); |
marfehr
commented
Jan 27, 2021
| expect(a.type).toBe(SetValueAction.TYPE); | ||
| expect((a as SetValueAction<Boxed<string[]>>).value).toEqual(box(SELECT_OPTIONS)); | ||
| expect(a.type).toBe(SetValueAction.type); | ||
| // expect((a as SetValueAction<Boxed<string[]>>).value).toEqual(box(SELECT_OPTIONS)); |
marfehr
commented
Jan 27, 2021
| expect(a.type).toBe(SetValueAction.TYPE); | ||
| expect((a as SetValueAction<number>).value).toBe(SELECT_NUMBER_OPTIONS[0]); | ||
| expect(a.type).toBe(SetValueAction.type); | ||
| // expect((a as SetValueAction<number>).value).toBe(SELECT_NUMBER_OPTIONS[0]); |
marfehr
commented
Jan 27, 2021
| extends NgrxFormControlDirective<TStateValue, TViewValue> { | ||
|
|
||
| @Output() ngrxFormsAction = new EventEmitter<Actions<NgrxFormControlValueType<TStateValue>>>(); | ||
| @Output() ngrxFormsAction = new EventEmitter<any>(); // type fix me |
marfehr
commented
Jan 27, 2021
| export class NgrxLocalFormDirective<TStateValue> extends NgrxFormDirective<TStateValue> { | ||
|
|
||
| @Output() ngrxFormsAction = new EventEmitter<Actions<TStateValue>>(); | ||
| @Output() ngrxFormsAction = new EventEmitter<any>(); // type fix me |
marfehr
commented
Jan 27, 2021
| ResetActionType = 'ngrx/forms/RESET' | ||
| } | ||
|
|
||
| // using the creator fnc doesnt break api and we can use generic types |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.